#include <stdio.h>
#include <math.h>
#include <sstream>
#include <iostream>
#include <string>
#include <cstring>


#include <webots/Robot.hpp>
#include <webots/DifferentialWheels.hpp>


#include <ros/ros.h>
#include <sensor_msgs/JointState.h>


// %EndTag(MSG_HEADER)%

#include <tf/transform_broadcaster.h>
#include <tf/transform_listener.h>



using namespace std;
using namespace webots;



class RWJointPub
{
public:
  RWJointPub();
  void init(webots::Robot*,ros::NodeHandle*,string);
  ~RWJointPub();

  void iterate();
private:
  double time_step;

  ros::NodeHandle* n;
  webots::Robot* R;
  ros::Publisher joint_state_pub;
  sensor_msgs::JointState RobJoints;
  std::vector<string> joint_names;

};
